<?php
/**
当你要创建相同用户名和密码的多个数据库链接时，PHP将视为同一个的链接。这意味着如果链接不同的数据库就会出问题。解决方法有两个，一是使用不同的用户名密码，或是使用NConnect()函数进行链接。
也就是说使用NConnect()代替Connect()或PConnect()。

由于apache有使用进程池, 一个httpd进程结束后会被放回进程池, 这也就使得用pconnect打开的的那个mysql连接资源不被释放, 于是有下一个连接请求时就可以被复用.

因此在并发访问量不高时,使用pconnect可以简单提高访问速度, 但在并发量增大后, 是否再使用pconnect就要看程序员的选择了.
**/
//Aliarm
$db = &ADONewConnection($_DB[type]);
$db->PConnect($_DB[host], $_DB[user], $_DB[password], $_DB[name]);
$db->Execute("SET NAMES utf8");

//Hiteclaser
$db_H = &ADONewConnection($_DB_H[type]);
$db_H->PConnect($_DB_H[host], $_DB_H[user], $_DB_H[password], $_DB_H[name]);
$db_H->Execute("SET NAMES latin1");

//Lucklaser.jp
$db_LJ = &ADONewConnection($_DB_LJ[type]);
$db_LJ->PConnect($_DB_LJ[host], $_DB_LJ[user], $_DB_LJ[password], $_DB_LJ[name]);
$db_LJ->Execute("SET NAMES latin1");


//Lucklaser-kr
$db_LK = &ADONewConnection($_DB_LK[type]);
$db_LK->PConnect($_DB_LK[host], $_DB_LK[user], $_DB_LK[password], $_DB_LK[name]);
$db_LK->Execute("SET NAMES latin1");




//Laser-door
$db_LD = &ADONewConnection($_DB_LD[type]);
$db_LD->PConnect($_DB_LD[host], $_DB_LD[user], $_DB_LD[password], $_DB_LD[name]);
$db_LD->Execute("SET NAMES latin1");


//Lucklaser
$db_L = &ADONewConnection($_DB_L[type]);
$db_L->PConnect($_DB_L[host], $_DB_L[user], $_DB_L[password], $_DB_L[name]);
$db_L->Execute("SET NAMES latin1");

//Kennbikyou
$db_K = &ADONewConnection($_DB_K[type]);
$db_K->PConnect($_DB_K[host], $_DB_K[user], $_DB_K[password], $_DB_K[name]);
$db_K->Execute("SET NAMES latin1");


//Dmicroscope
$db_D = &ADONewConnection($_DB_D[type]);
$db_D->PConnect($_DB_D[host], $_DB_D[user], $_DB_D[password], $_DB_D[name]);
$db_D->Execute("SET NAMES latin1");


//Spycamhidden
$db_S = &ADONewConnection($_DB_S[type]);
$db_S->PConnect($_DB_S[host], $_DB_S[user], $_DB_S[password], $_DB_S[name]);
$db_S->Execute("SET NAMES latin1");


//Civillaser
$db_C = &ADONewConnection($_DB_C[type]);
$db_C->PConnect($_DB_C[host], $_DB_C[user], $_DB_C[password], $_DB_C[name]);
$db_C->Execute("SET NAMES latin1");


//Civillaser_jp
$db_CJ = &ADONewConnection($_DB_CJ[type]);
$db_CJ->PConnect($_DB_CJ[host], $_DB_CJ[user], $_DB_CJ[password], $_DB_CJ[name]);
$db_CJ->Execute("SET NAMES latin1");

//CanetaLaser
$db_CA = &ADONewConnection($_DB_CA[type]);
$db_CA->PConnect($_DB_CA[host], $_DB_CA[user], $_DB_CA[password], $_DB_CA[name]);
$db_CA->Execute("SET NAMES latin1");




$ADODB_CACHE_DIR = "./config/adodb_cache/";  //相对路径，不同路径层次引用的地方，不能统一使用
$tpl = new Smarty();
$tpl->template_dir = "./config/smarty_templates/";
$tpl->cache_dir = "./config/smarty_cache/";
$tpl->compile_dir = "./config/smarty_complied/";
$tpl->left_delimiter = "<%";
$tpl->right_delimiter = "%>";
?>
